﻿Public Class TypeReader
    <Obsolete("Read(asm As Assembly)を使用してください。")>
    Public Shared Function Read(file As String) As IEnumerable(Of Type)
        'アセンブリからクラスを取得します。
        Dim asm As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom(file)
        Return (From el In asm.GetTypes Where el.IsClass AndAlso el.IsPublic AndAlso el.IsAbstract = False)
    End Function

    Public Shared Function Read(asm As System.Reflection.Assembly) As IEnumerable(Of Type)
        'アセンブリからクラスを取得します。
        Return (From el In asm.GetTypes Where el.IsClass AndAlso el.IsPublic AndAlso el.IsAbstract = False)
    End Function
End Class
